package com.zengqingfa.designpattern.behavior.observer.jdk;

import java.util.Observable;

/**
 *
 * @fileName: ConcreteSubject
 * @author: zengqf3
 * @date: 2021-4-23 15:06
 * @description: 具体主题（被观察者）
 */
public class ConcreteSubject extends Observable {

    /**
     * 触发更新
     */
    public void triggle(String notice) {
        System.out.println("被观察者事件发生改变");
        setChanged();
        notifyObservers(notice);
    }
}
